<template>
    <div>
        <el-table :data="datalist" style="width: 100%">
            <el-table-column type="index" :index="(currentPage - 1) * limit + 1" label="序号" width="50" />
            <el-table-column prop="name" label="作者" width="100"></el-table-column>
            <el-table-column prop="sex" label="操作" width="100"></el-table-column>
            <el-table-column prop="phone" label="标题" width="100"></el-table-column>
            <el-table-column prop="password" label="日期" width="100"></el-table-column>
            <el-table-column prop="status" width="100" label="作者"></el-table-column>
            <el-table-column prop="createDate" label="操作" width="100"></el-table-column>
            <el-table-column prop="lastTime" label="标题" width="100"></el-table-column>
            <el-table-column prop="company" label="日期" width="100"></el-table-column>
            <el-table-column prop="specialty" width="100" label="作者"></el-table-column>
            <el-table-column prop="numberCard" label="操作" width="100"></el-table-column>
            <el-table-column fixed="right" label="1" width="100">
                <template slot-scope="scope">
                    <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
<!--                    <el-button type="text" size="small" @click="handleClick(scope.row.title)">审核</el-button>-->
                </template>
            </el-table-column>
        </el-table>
        <!--弹出框-->
        <el-dialog :visible.sync="dialogVisible" width="40%">
            <p style="font-size: 16px;color: red;text-align: left;" slot="title">{{ aTitle }}</p>
<!--            <el-form ref="formInfo" :model="formInfo" label-width="80px">-->
<!--                <el-form-item label="审核状态">-->
<!--                    <el-radio-group v-model="formInfo.rdState">-->
<!--                        <el-radio label="1">审核通过</el-radio>-->
<!--                        <el-radio label="0">审核不通过</el-radio>-->
<!--                    </el-radio-group>-->
<!--                </el-form-item>-->
<!--                <el-form-item label="审核内容"><el-input type="textarea" v-model="formInfo.content"></el-input></el-form-item>-->
<!--                <el-form-item><el-button type="primary" @click="onSubmit">提交</el-button></el-form-item>-->
<!--            </el-form>-->
        </el-dialog>
    </div>
</template>

<script>
    export default {
        name: 'Datazhuan',
        props: {
            datalist: Array,
            currentPage: Number,
            limit: Number
        },
        data() {
            return {
                dialogVisible: false,
                aTitle: '',
                formInfo: {
                    rdState: '0',
                    content: ''
                }
            };
        },
        methods: {
            handleClick(title) {
                this.dialogVisible = true;
                this.aTitle = title;
            },
            handleClose(done) {
                this.$confirm('确认关闭？')
                    .then(_ => {//eslint-disable-line no-unused-vars
                        done();
                    })
                    .catch(_ => {});//eslint-disable-line no-unused-vars
            },
            onSubmit() {
                console.log('操作完成');
                console.log(this.formInfo);
                this.dialogVisible = false;
            }
        }
    };
</script>

<style></style>
